/*
 * @Author: Mr · Lei
 * @Date: 2024-10-17 14:57:44
 * @LastEditors: OBKoro1
 * @LastEditTime: 2024-10-17 14:57:44
 * @FilePath: \ruituan-tuan-web\src\api\nfc.ts
 * @Description: 
 * 
 * Copyright (c) 2024 by 四川开局红科技有限公司, All Rights Reserved. 
 */
import axios from 'axios';
import qs from 'query-string';

export interface PolicyRecord {
  id: string;
}

export interface PolicyParams extends Partial<PolicyRecord> {
  page: number;
  limit: number;
  filter?: string;
  op?: string;
}

export interface PolicyListRes {
  list: PolicyRecord[];
  total: number;
}
// 订单列表
export function GetNfcOrderListApi(params:any) {
  return axios.get('/admin/code_order/list', {
    params,
    paramsSerializer: (obj) => {
      return qs.stringify(obj);
    },
  });
}
// 收益列表
export function GetIncomeLogListApi(params:any) {
  return axios.get('/admin/touch_profit/list', {
    params,
    paramsSerializer: (obj) => {
      return qs.stringify(obj);
    },
  });
}
// 收益配置列表
export function GetIncomeConfigListApi(params:any) {
  return axios.get('/admin/touch_profit_config/list', {
    params,
    paramsSerializer: (obj) => {
      return qs.stringify(obj);
    },
  });
}
// 收益人员列表
export function GetUserConfigListApi(params:any) {
  return axios.get('/admin/touch_profit_user/list', {
    params,
    paramsSerializer: (obj) => {
      return qs.stringify(obj);
    },
  });
}
// 新增收益配置
export function AddIncomeConfigApi(data: any) {
  return axios.post('/admin/touch_profit_config/add', data);
}
// 修改收益配置
export function EditIncomeConfigApi(data: any) {
  return axios.post('/admin/touch_profit_config/edit', data);
}
// 删除收益配置
export function DeleteIncomeConfigApi(data: any) {
  return axios.post('/admin/touch_profit_config/remove', data);
}
// 新增人员
export function AddUserConfigApi(data: any) {
  return axios.post('/admin/touch_profit_user/add', data);
}
// 修改人员
export function EditUserConfigApi(data: any) {
  return axios.post('/admin/touch_profit_user/edit', data);
}
// 删除人员
export function DeleteUserConfigApi(data: any) {
  return axios.post('/admin/touch_profit_user/remove', data);
}